import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/home/Home'
import Detail from '@/pages/details/Detail'
import DetailContentDesc from '@/pages/details/components/DetailContentDesc'
import DetailContentDesc0 from '@/pages/details/components/DetailContentDesc0'
// vuex使用测试
import One from '@/pages/storetest/One'
import Two from '@/pages/storetest/Two'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/Detail',
      name: 'Detail',
      component: Detail,
      redirect: '/detail/analysis',
      children: [
        {
          path: 'analysis',
          name: 'analysis',
          component: DetailContentDesc
        },
        {
          path: 'forecast',
          name: 'forecast',
          component: DetailContentDesc0
        }
      ]
    },
    {
      path: '/one',
      name: 'One',
      component: One
    },
    {
      path: '/two',
      name: 'Two',
      component: Two
    }
  ]
})
